function DlmanageUtils() {
};

DlmanageUtils.number = 20;

/**
 * 清理界面对象
 */
DlmanageUtils.clear = function(gui) {
  for (key in gui) {
    var elem = gui[key];
    if (!elem) {
      continue;
    }
    if (elem.constructor.toString().indexOf('Array') == -1 && elem.constructor.toString().indexOf('Object') == -1) {
      if (!elem._protected) {
        DOMUtils.removeChildElements(elem);
      }
    } else {
      this.clear(elem);
    }
  }
};

/**
 * 
 */
DlmanageUtils.search = function() {
  return { keyword: '',
           dateFrom: null,
           dateTo: null
         };
};

DlmanageUtils.weekly = function(number) {
  switch(number) {
    case 0:
      return 'SUN';
      break;
    case 1:
      return 'MON';
      break;
    case 2:
      return 'TUE';
      break;
    case 3:
      return 'WED';
      break;
    case 4:
      return 'THU';
      break;
    case 5:
      return 'FRI';
      break;
    case 6:
      return 'SAT';
      break;
  }
}

DlmanageUtils.monthChange = function(month) {
  var x = '';
  if (month == '1') {
    x = 'JAN';
  } else if (month == '2') {
    x = 'FEB';
  } else if (month == '3') {
    x = 'MAR';
  } else if (month == '4') {
    x = 'APR';
  } else if (month == '5') {
    x = 'MAY';
  } else if (month == '6') {
    x = 'JUN';
  } else if (month == '7') {
    x = 'JUL';
  } else if (month == '8') {
    x = 'AUG';
  } else if (month == '9') {
    x = 'SEP';
  } else if (month == '10') {
    x = 'OCT';
  } else if (month == '11') {
    x = 'NOV';
  } else {
    x = 'DEC';
  }
  return x;
};

